﻿@using com.subb.WebFramework;
@using WebEntities.Models.Framework;
@using System.Configuration;
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/sitejs")
    @RenderSection("scripts", false)
    @{
        FW_SiteArgsDAL sdal = new FW_SiteArgsDAL();
        int argId;
        if (int.TryParse(ConfigurationManager.AppSettings["SiteArgId"], out argId))
        {
            argId = 1;
        }
        WebsiteConfig webcfg = WebsiteConfig.AsWebsiteConfig(sdal.GetWebConfig(argId));
        string weback = webcfg.BackgroundImage;
        string backrepeat = webcfg.BackgroundRepeat;
        backrepeat = string.IsNullOrWhiteSpace(backrepeat) ? "no-repeat" : backrepeat;
    }
    <style type="text/css">
        body
        {
            @if (string.IsNullOrWhiteSpace(weback))
            {
                @:background-color:white;
            }
            else
            {
                @("background-image:url(" + weback + ");");
            }
            @("background-repeat:"+backrepeat+";")
        }
    </style>
</head>
<body>
    <div id="base_container">
        @Html.Hidden("defactmenu",(string)(ViewBag.ActMenu))
        <div class="topbar">
            <div class="comlogo">
                <img src="/Images/3logos_2.jpg" usemap="#logomap" alt="" />
                <map name="logomap">
                    <area shape="rect" coords="0,0,80,70" href="http://www.gzlig.com" alt="Guangzhou Light Industrial And Trade Group Co., Ltd." target="_blank" />
                    <area shape="rect" coords="81,0,270,70" href="/" alt="Guangzhou HuaQiao Sugar Factory，Guangzhou Brewery" />
                </map>
            </div>
            <div class="cominfo">
                <div>
                    <a href="/" target="_blank">中文</a> | <a href="/en/home/sitemap" target="_blank">SITE MAP</a>
                </div>
                <div>
                    <a href="http://wpa.qq.com/msgrd?V=1&Uin=2747324145&Site=Guangzhou HuaQiao Sugar Factory&Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:2747324145:8" alt="QQ留言" style="vertical-align:middle"></a>
                </div>
            </div>
            <div class="cls"></div>
            <div class="menubar">
                <ul>
                    <li id="home" class="@(ViewBag.ActMenu == "home" ? "actmenu" : string.Empty)"><a href="/en">HOME</a></li>
                    <li id="aboutus" class="@(ViewBag.ActMenu == "aboutus" ? "actmenu" : string.Empty)"><a href="/en/aboutus">ABOUT US</a></li>
                    <li id="products" class="@(ViewBag.ActMenu == "products" ? "actmenu" : string.Empty)"><a href="/en/products">PRODUCTS</a></li>
                    <li id="contactus" class="@(ViewBag.ActMenu == "contactus" ? "actmenu" : string.Empty)"><a href="/en/contactus">CONTACT US</a></li>
                </ul>
            </div>
        </div>
        <div class="cls"></div>
        <div>
            @RenderBody()
        </div>
        <div class="cls"></div>
        <div class="footer">
            <div class="fot1">
                <div>
                    <img src="/Images/qglogo2.jpg" alt="Guangzhou Light Industrial And Trade Group Co., Ltd." />
                </div>
            </div>
            <div class="fot2">
                <p style="float:left">Copyright © 2013 Guangzhou HuaQiao Sugar Factory</p>
                <p style="float:right">粤ICP备14024043号-1</p>
                <div class="cls"></div>
            </div>
        </div>
    </div>
</body>
</html>

